<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>虚拟机使用申请管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/biz/bizVmApply/">虚拟机使用申请列表</a></li>
		<%--<shiro:hasPermission name="biz:bizVmApply:edit"><li><a href="${ctx}/biz/bizVmApply/form">虚拟机使用申请添加</a></li></shiro:hasPermission>--%>
	</ul>
	<form:form id="searchForm" modelAttribute="bizVmApply" action="${ctx}/biz/bizVmApply/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>名称：</label>
				<form:input path="name" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>申请人姓名：</label>
				<form:input path="applyName" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li><label>审核标记：</label>
				<form:select path="checkFlag" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('check_flag')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</li>
			<li><label>身份证号：</label>
				<form:input path="applyIdCard" htmlEscape="false" maxlength="100" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>名称</th>
				<th>使用开始时间</th>
				<th>使用结束时间</th>
				<th>申请人身份证号</th>
				<th>申请人姓名</th>
				<th>审核人姓名</th>
				<th>审核标记</th>
				<th>审核未通过原因</th>
				<th>审核时间</th>
				<th>更新时间</th>
				<th>备注信息</th>
				<shiro:hasPermission name="biz:bizVmApply:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="bizVmApply">
			<tr>
				<td><a href="${ctx}/biz/bizVmApply/form?id=${bizVmApply.id}">
					${bizVmApply.name}
				</a></td>
				<td>
					<fmt:formatDate value="${bizVmApply.applyStartDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					<fmt:formatDate value="${bizVmApply.applyEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${bizVmApply.applyIdCard}
				</td>
				<td>
					${bizVmApply.applyName}
				</td>
				<td>
					${bizVmApply.checkName}
				</td>
				<td>
					${fns:getDictLabel(bizVmApply.checkFlag, 'check_flag', '')}
				</td>
				<td>
					${bizVmApply.checkReason}
				</td>
				<td>
					<fmt:formatDate value="${bizVmApply.checkDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					<fmt:formatDate value="${bizVmApply.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${bizVmApply.remarks}
				</td>
				<shiro:hasPermission name="biz:bizVmApply:view"><td>
					<%--<a href="${ctx}/biz/bizVmApply/form?id=${bizVmApply.id}">修改</a>
                    <a href="${ctx}/biz/bizVmApply/delete?id=${bizVmApply.id}" onclick="return confirmx('确认要删除该虚拟机使用申请吗？', this.href)">删除</a>--%>
					<a href="${ctx}/biz/bizVmApply/form?id=${bizVmApply.id}">查看</a>
					<c:set var="user" value="${fns:getUser()}"/>
					<c:if test="${user.admin && bizVmApply.checkFlag eq '1'}">
						<a href="${ctx}/biz/bizVmApply/form?id=${bizVmApply.id}&op=2">审核</a>
					</c:if>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>